﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _20160108_TestStudentExample
{
    class Program
    {
        static void Main(string[] args)
        {
            string path = @"D:\C#Training\Inteducation\operskii\20160108_TestStudentExample\20160108_TestStudentExample\Students.txt";
            List<Student> studentsIn = new List<Student>();
            studentsIn.Add(new Student("Иванов", "Иван"));
            studentsIn.Add(new Student("Петров", "Петр"));
            studentsIn.Add(new Student("Сидоров", "Сидр"));
            Student.SaveStudentsListToFile(path, studentsIn);
            
            List<Student> studentsOut = Student.GetStudentsFromFile(path);
            foreach (var student in studentsOut)
                Console.WriteLine(student);
        }
    }
}
